package simpleFactory.pizza;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-03-07
 * Time: 20:37
 */

//将Pizza作为一个抽象类
public abstract class Pizza {

    protected String name;  //名字

    //准备制作的原材料 不同的披萨是不一样的 做成一个抽象方法
    public abstract void prepare();
    //烘烤
    public void bake() {
        System.out.println(name + " baking;");
    }
    //切割
    public void cut() {
        System.out.println(name + " cutting;");
    }
    //打包
    public void box() {
        System.out.println(name + " boxing;");
    }

    public void setName(String name) {
        this.name = name;
    }

}
